package com.testMvc.testSpring;

import com.core.jdbc.MySqlSession;
import com.core.spring.annotate.MyBean;
import com.testMvc.custMvc.CustDao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@MyBean
public class CustServiceImpl implements CustService {
    @Override
    public List<Map<String, Object>> getCusts() {
        CustDao cd = MySqlSession.getMapper(CustDao.class);

        Map<String, Object> par = new HashMap<>();
        par.put("name", "%杜%");
        return cd.getCustList(par);
    }

    @Override
    public void speak() {
        System.out.println("I'am speak");
    }
}
